package com.xianglong.service;


import com.xianglong.mapper.TestMapper;
import com.xianglong.entity.testEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestService {
    @Autowired
    private TestMapper testMapper;

    public List<testEntity> list(){
        return testMapper.getAll();
    }

    public int add(testEntity entity){
        return testMapper.insert(entity);
    }

    public int update(testEntity entity){
        return  testMapper.update(entity);
    }

    public int delect(testEntity entity){
        return  testMapper.delete(entity.getId());
    }


}
